﻿#region Using

using System;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using BlogEngine.Core;
using BlogEngine.Core.Web.Controls;
using System.Net.Mail;
using System.Text.RegularExpressions;
using System.Collections.Generic;

#endregion

public partial class coupon : BlogBasePage
{

    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        List<Coupon> coupons = Coupon.AllCoupon;
        var path = string.Format("{0}themes/{1}/CouponView.ascx", Utils.ApplicationRelativeWebRoot, BlogSettings.Instance.GetThemeWithAdjustments(this.Request.QueryString["theme"]));
        foreach (Coupon coupon in coupons)
        {
            var couponView = (CouponViewBase)this.LoadControl(path);
            couponView.Coupon = coupon;
            divCoupon.Controls.Add(couponView);
        }

        Page.Title = Server.HtmlEncode("优惠券");
        base.AddMetaTag("description", Utils.StripHtml("优惠券,Coupon,淘宝,亚马逊,京东,当当,凡客,VJIA"));
        base.AddMetaTag("ROBOTS", "NOINDEX, NOFOLLOW");
    }
}